Archive for the ‘New QTP 9.x’ Category

What is Quick Test Professional Tool ?

August 3, 2007

What is QTP ?
QuickTest is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications…
QTP is Mercury Interactive Functional Testing Tool. QTP stands for Quality Test Professional.
Mercury QuickTest Professional: provides the industry’s best solution for functional test and regression test automation – addressing every major software application and environment. This next-generation automated testing solution deploys the concept of Keyword-driven testing to radically simplify test creation and maintenance. Unique to QuickTest Professional’s Keyword-driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View.

QuickTest Professional enables you to test standard Windows applications, Web objects, ActiveX controls, and Visual Basic applications. You can also acquire additional QuickTest add-ins for a number of special environments (such as Java, Oracle, SAP Solutions, .NET Windows and Web Forms, Siebel, PeopleSoft, Web services, and terminal emulator applications).

What’s the basic concept of QTP?
QTP is based on two concept-
* Recording
* Playback

Which scripting language used by QTP?
QTP using VB scripting.

How many types of recording facility are available in QTP?
QTP provides three types of recording methods-
* Context Recording (Normal)
* Analog Recording
* Low Level Recording

How many types of Parameters are available in QTP?
QTP provides three types of Parameter-
* Method Argument
* Data Driven
* Dynamic

What’s the QTP testing process?
QTP testing process consist of seven steps-
* Preparing to recoding
* Recording
* Enhancing your script
* Debugging
* Run
* Analyze
* Report Defects (more…)

How to Start recording using QTP?
Choose Test > Record or click the Record button.
When the Record and Run Settings dialog box opens to do this;
1. In the Web tab, select Open the following browser when a record or run session begins.
2. In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed.

How to insert a check point to a image to check enable property in QTP?

Answer1:
AS you are saying that the all images are as push button than you can check the property enabled or disabled. If you are not able to find that property than go to object repository for that objecct and click on add remove to add the available properties to that object. Let me know if that works. And if you take it as image than you need to check visible or invisible property tht also might help you are there are no enable or disable properties for the image object.

Answer2:
The Image Checkpoint does not have any property to verify the enable/disable property.
One thing you need to check is:
* Find out form the Developer if he is showing different images for activating/deactiving i.e greyed out image. That is the only way a developer can show deactivate/activate if he is using an “image”. Else he might be using a button having a headsup with an image.
* If it is a button used to display with the headsup as an image you woudl need to use the object Properties as a checkpoint.
How to Save your test using QTP?
Select File > Save or click the Save button. The Save dialog box opens to the Tests folder.
Create a folder which you want to save to, select it, and click Open.
Type your test name in the File name field.
Confirm that Save Active Screen files is selected.
Click Save. Your test name is displayed in the title bar of the main QuickTest window.

How to Run a Test using QTP?
1 Start QuickTest and open your test.

If QuickTest is not already open, choose Start > Programs > QuickTest Professional > QuickTest Professional.

. If the Welcome window opens, click Open Existing.
. If QuickTest opens without displaying the Welcome window, choose File > Open or click the Open button.
In the Open Test dialog box, locate and select your test, then click Open.

2 Confirm that all images are saved to the test results.
QuickTest allows you to determine when to save images to the test results.

Choose Tools > Options and select the Run tab. In the Save step screen capture to test results option, select Always.

Click OK to close the Options dialog box.

3 Start running your test.

Click Run or choose Test > Run. The Run dialog box opens.
Select New run results folder. Accept the default results folder name.
Click OK to close the Run dialog box.

How to open a new test using QTP?
1. If QuickTest is not currently open, choose Start > Programs > QuickTest Professional > QuickTest Professional. If the Welcome window opens, click Blank Test. Otherwise, choose File > New, or click the New button. A blank test opens. 2. . If QuickTest is already open, check which add-ins are loaded by selecting Help > About QuickTest Professional. If the Web Add-in is not loaded, you must exit and restart QuickTest. When the Add-in Manager opens, select the Web Add-in, and clear all other add-ins. Choose File > New, or click the New button. A blank test opens.

How to do Laod testing for web based Application?
1. Recording a scenerio in QTP of my web based application.
2. Make 100 copies of that scenerio and run the test (scenerio run for 100 times)
3. In that case, do the load of application on server.
4. The basic logic of running the copy 100 times is to create same scenerio as if 100 users were working.

What is the extension of script and object repository files?
Object Repository : .tsr , Script : .mts, Excel : Default.xls

How to supress warnings from the “Test results page”?
From the Test results Viewer “Tools > Filters > Warnings”…must be “Unchecked”.

When we try to use test run option “Run from Step”, the browser is not launching automatically why?
This is default behaviour.
What’s Checkpoints for QTP?
A checkpoint verifies that expected information is displayed in your application while the test is running.

QuickTest Professional offers the following types of checkpoints:
Checkpoint Type Description Example of Use
Standard Checkpoint Checks values of an object’s properties. Check that a radio button is selected.
Image Checkpoint Checks the property values of an image. Check that the image source file is correct.
Table Checkpoint Checks information in a table. Check that the value in a table cell is correct.
Page Checkpoint Checks the characteristics of a Web page. Check how long a Web page takes to load or if a Web page contains broken links.
Text / Text Area Checkpoint Checks that a text string is displayed in the appropriate place in a Web page or application window. Check whether the expected text string is displayed in the expected locatio
Bitmap Checkpoint Checks an area of a Web page or application after capturing it as a bitmap Check that a Web page (or any portion of it) is displayed as expected.
Database Checkpoint Checks the contents of databases accessed by an application or Web site Check that the value in a database query is correct.
Accessibility Checkpoint Identifies areas of a Web site to check for Section 508 compliancy. Check if the images on a Web page include ALT properties, required by the W3C Web Content Accessibility Guidelines.
XML Checkpoint Checks the data content of XML documents. Note: XML file checkpoints are used to check a specified XML file; XML application checkpoints are used to check an XML document within a Web page.

How to add a standard checkpoint in your test ?
1. Start QuickTest and open your test.
In the Open Test dialog box, locate and select your test, then click Open.

2. Save the test as Checkpoint.
Select File > Save As. Save the test as Checkpoint.

3. Confirm that the Active Screen option is enabled.
If you do not see the Active Screen at the bottom of the QuickTest window, click the Active Screen button, or choose View > Active Screen.

4. Locate the page where you want to add a standard checkpoint.

5 Create a standard checkpoint.
In the Active Screen, right-click element in your application and choose Insert Standard Checkpoint.

6 Save the test.

How to add a page checkpoint to your test?
The page checkpoint checks that the number of links and images in the page when you run your test is the same as when you recorded your test.
1 Locate the page where you want to add a page checkpoint.
2 Create a page checkpoint.
Right-click anywhere in the Active Screen, and choose Insert Standard Checkpoint. The Object Selection – Checkpoint Properties dialog box opens. Note that this dialog box may include different elements, depending on where you click in the Active Screen.
3 Save the test.
How Does Run time data (Parameterization) is handled in QTP?
You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.

What is keyword view and Expert view in QTP?
QuickTest’s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.

How QTP recognizes Objects in AUT?
QuickTest stores the definitions for application objects in a file called the Object Repository. As you record your test, QuickTest will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by QuickTest), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the QuickTest script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.

What are the types of Object Repositorys in QTP?
QuickTest has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, QuickTest automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an object’s property values in one action, you may need to make the same change in every action (and any test) containing the object.

If I give some thousand tests to execute in 2 days what do u do?
Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.
Does QTP is “Unicode” compatible?
QTP 6.5 is not but QTP 8.0 is expected to be Unicode compatabile by end of December 2004.

How to “Turn Off” QTP results after running a Script?
Goto “Tools > Options > Run Tab” and Deselect “View results when run session ends”. But this supresses only the result window, but a og will be created and can viewed manulaly which cannot be restricted from getting created.

Explain about the Test Fusion Report of QTP ?
Once a tester has run a test, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining TestFusion reports with QuickTest Professional, you can share reports across an entire QA and development team.

To which environments does QTP supports ?
QuickTest Professional supports functional testing of all enterprise environments, including Windows, Web, ..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services.

What’s QuickTest Window?
Before you begin creating tests, you should familiarize yourself with the main QuickTest window.
The QuickTest window contains the following key elements:
. Title bar—Displays the name of the currently open test.
. Menu bar—Displays menus of QuickTest commands.
. File toolbar—Contains buttons to assist you in managing your test.
. Testing toolbar—Contains buttons to assist you in the testing process.
. Debug toolbar—Contains buttons to assist you in debugging tests.
. Test pane—Contains the Keyword View and Expert View tabs.
. Active Screen—Provides a snapshot of your application as it appeared when you performed a certain step during the recording session.
. Data Table—Assists you in parameterizing your test.
. Debug Viewer pane—Assists you in debugging your test. The Debug Viewer pane contains the Watch Expressions, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open QuickTest for the first time. You can display the Debug Viewer by choosing View

QuickTest identifies the object that you clicked as a WebButton test object. It creates a WebButton object with the name Find, and records the following properties and values for the Find WebButton:
It also records that you performed a Click method on the WebButton.
QuickTest displays your step in the Keyword View like this:
QuickTest displays your step in the Expert View like this:
Browser(”Mercury Interactive”).Page(”Mercury Interactive”).
WebButton(”Find”).
How to analyzing Test Results using QTP?
When QuickTest finishes running the test, the Test Results window opens.
Initially, the Test Results window contains two panes for displaying the key elements of your test run.
. The left pane displays the results tree, an icon-based view of the steps that were performed while the test was running. The results tree is organized according to the Web pages visited during the test run and can be expanded (+) to view each step. The steps performed during the test run are represented by icons in the tree. You can instruct QuickTest to run a test or action more than once using different sets of data in each run. Each test run is called an iteration, and each iteration is numbered. (The test you ran had only one iteration.)
. The right pane displays the test results details. The iteration summary table indicates which iterations passed and which failed. The status summary table indicates the number of checkpoints or reports that passed, failed, and raised warnings during the test.
1 View the test results for a specific step.
In the results tree, expand (+) Test Recording Summary > Recording Iteration 1 (Row 1) > Action1 Summary > your application > your test name .
The Test Results window now contains three panes, displaying:
. the results tree, with one step highlighted
. the test results details of the highlighted step
. the Active Screen, showing a screen capture of the Web page on which the step was performed.

When you click a page in the results tree, QuickTest displays the corresponding page in the application view. When you click a step (an operation performed on an object) in the results tree, the corresponding object is highlighted in the application view. In this case, the Departing From text box is highlighted.

Explain the check points in QTP?
A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP.

• A page checkpoint checks the characteristics of a Application
• A text checkpoint checks that a text string is displayed in the appropriate place on a Application.
• An object checkpoint (Standard) checks the values of an object on a Application.
• An image checkpoint checks the values of an image on a Application.
• A table checkpoint checks information within a table on a Application
• An Accessiblity checkpoint checks the web page for Section 508 compliance.
• An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.
• A database checkpoint checks the contents of databases accessed by your web site

In how many ways we can add check points to an application using QTP.
We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).
Explain in brief about the QTP Automation Object Model.
Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program.

Discuss QTP Environment.
QuickTest Pro environment using the graphical interface and ActiveScreen technologies – A testing process for creating test scripts, relating manual test requirements to automated verification features – Data driving to use several sets of data using one test script.

Explain the concept of how QTP identifies object.
During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.
Object Repositories types, Which & when to use?
Deciding Which Object Repository Mode to Choose
To choose the default object repository mode and the appropriate object repository mode for each test, you need to understand the differences between the two modes.
In general, the object repository per-action mode is easiest to use when you are creating simple record and run tests, especially under the following conditions:

You have only one, or very few, tests that correspond to a given application, interface, or set of objects.
You do not expect to frequently modify test object properties.
You generally create single-action tests.
Conversely, the shared object repository mode is generally the preferred mode when:

You have several tests that test elements of the same application, interface, or set of objects.
You expect the object properties in your application to change from time to time and/or you regularly need to update or modify test object properties.
You often work with multi-action tests and regularly use the Insert Copy of Action and Insert Call to Action options.

Can we Script any test case with out having Object repository? or Using Object Repository is a must?
No. U can script with out Object repository by knowing the Window Handlers, spying and recognizing the objects logical names and properties available.

How to execute a WinRunner Script in QTP?
(a) TSLTest.RunTest TestPath, TestSet [, Parameters ] –> Used in QTP 6.0 used for backward compatibility Parameters : The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center project. When the test is not saved in Quality Center, this parameter is ignored.
e.g : TSLTest.RunTest “D:\test1?, “”
(b)TSLTest.RunTestEx TestPath, RunMinimized, CloseApp [, Parameters ] TSLTest.RunTestEx “C:\WinRunner\Tests\basic_flight”, TRUE, FALSE, “MyValue” CloseApp : Indicates whether to close the WinRunner application when the WinRunner test run ends. Parameters : Up to 15 WinRunner function argument
Why divide a test into three action calls?
When you create a new test, it contains a call to one action. By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.

How To clear the AutoComplete?
1 In your Internet Explorer’s menu bar, choose Tools > Internet Options > Content tab.
2 Click AutoComplete in the Personal information area. The AutoComplete Settings dialog box opens.
3 In the Use AutoComplete for area, clear the User names and passwords on forms option.
4 Click OK to save your changes and close the AutoComplete Settings dialog box, then click OK again to close the Internet Options dialog box.

What is Object Spy in QTP?
Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
What is the Diff between Image check-point and Bit map Check point?
Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.
You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).
Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.

How many ways we can parameterize data in QTP ?
There are four types of parameters:
Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.
Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.

How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Batch Testing in WR is nothing but running the whole test set by selecting “Run Testset” from the “Execution Grid”.The same is possible with QTP also. If our test cases are automated then by selecting “Run Testset” all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in “Waiting” mode.

How to use the Object spy in QTP 8.0 version?
There are two ways to Spy the objects in QTP
1) Thru file toolbar
—In the File ToolBar click on the last toolbar button (an icon showing a person with hat). 2) Tru Object repository Dialog
—In Objectrepository dialog click on the button”object spy…”

In the Object spy Dialog click on the button showing hand symbol. the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.

What is the file extension of the code file & object repository file in QTP?
File extension of
– Per test object rep :- filename.mtr
– Shared Oject rep :- filename.tsr
Code file extension id script.mts

How to Creating an Output Value using QTP?
1 Start QuickTest and open the Parameter test.
2 Save the test as Output.
3 Confirm that the Active Screen option is enabled.
4 Select the text you want to use as an output value.
5 Set the output value settings.
6 Modify the table checkpoint.
7 Save the test.
What does it mean when a check point is in red color? what do u do?
A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue.

What do you call the window testdirector-testlab?
“Execution Grid”. It is place from where we Run all Manual / Automated Scripts

How do u create new test sets in TD
Login to TD.
Click on “Test Lab” tab.
Select the Desired folder under which we need to Create the Test Set. ( Test Sets can be grouped as per module.) Click on “New Test Set or Ctrl+N” Icon to create a Test Set.

Explain the concept of object repository & how QTP recognises objects?
Object Repository: displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.

What are the properties you would use for identifying a browser & page when using descriptive programming ?
“name” would be another property apart from “title” that we can use. OR We can also use the property “micClass”. ex: Browser(”micClass:=browser”).page(”micClass:=page”)….

I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?
U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad “( i.e., where the notepad.exe is stored in the system) in the “Windows Applications Tab” of the “Record and Run Settings window. Try it out. All the Best.

If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?
If an application name is changes frequently i.e while recording it has name ?Window1? and then while running its ?Windows2? in this case how does QTP handles? QTP handles those situations using ?Regular Expressions?. …

How does QTP identifies the object in the application?
How does QTP identifies the object in the application? QTP identifies the object in the application by LogicalName and Class. For example: The Edit box is identified by Logical Name : PSOPTIONS_BSE_TIME20 Class: WebEdit …

IF we use batch testing.the result shown for last action only.in that how can i get result for every action.
You can click on the icon in the tree view to view the result of every action
WinRunner Compared to QuickTest Pro

Environment Coverage Comparison:

Common environments shared by both WinRunner and QuickTest Pro:

Web-Related Environments IE, Netscape, AOL
JDK, Java Foundation Classes, AWT
Symantec Visual Café
ActiveX Controls
ERP/CRM Oracle: Jinitiator, 11i, NCA
Custom Client Server Windows
C++/C
Visual Basic
Operating Systems Windows 98, 2000, NT, ME, XP
Legacy 3270, 5250 Emulators
VT100

WinRunner Only Environments:
Custom Client/Server PowerBuilder
Forte
Delphi
Centura
Stingray
SmallTalk
ERP/CRM Baan
PeopleSoft Windows
Siebel 5, 6 GUI Clients
Oracle GUI Forms
QuickTest Pro Only Environments:
ERP/CRM SAP
Siebel 7.x
PeopleSoft 8.x
.Net WinForms
WebForms
.Net controls
Web Services XML, HTTP
WSDL, SOAP
J2EE, .Net
Multimedia RealAudio/Video
Flash
Feature Comparison:

Common features found in both WinRunner and QuickTest Pro:
Record/Replay ODBC & Excel Connectivity
Code Editor & Debugger Recovery Manager
Shared Object Repository Rapid Object Import
Numerous Checkpoints Analog
Script & Function Libraries

WinRunner Only Environments:
Function Generator Database Integration
Run Wizard TSL
MDI

QuickTest Pro Only Environments:
ActiveScreen TestGuard
Tree View ScriptFusion
Data Table VBScript
Function Generator*
(coming in v7.0) Run Wizard*
(coming in v7.0)

How to Import data from a “.xls” file to Data table during Runtime.
Datatable.Import “…XLS file name…”
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
DataTable.ImportSheet “C:\name.xls” ,1 ,”name”

How to export data present in Datatable to an “.xls” file?
DataTable.Export “….xls file name…”

Syntact for how to call one script from another? and Syntax to call one “Action” in another?
RunAction ActionName, [IterationMode , IterationRange , Parameters]
Here the actions becomes reusable on making this call to any Action.
IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. “1-7?), or enter rngAll to run iterations on all rows.
If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction’s RetVal argument.

How to export QTP results to an “.xls” file?
By default it creates an “XML” file and displays the results

How the exception handling can be done using QTP
It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager …….

How many types of Actions are there in QTP?
There are three kinds of actions:
non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.

Analyzing the Checpoint results
Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object’s current values during a run session. If the results do not match, the checkpoint fails.

How to handle Run-time errors?
On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.
Using “Err” object msgbox “Error no: ” & ” ” & Err.Number & ” ” & Err.description & ” ” & Err.Source & Err.HelpContext

What are the different scripting languages you could use when working with QTP ?
Visual Basic (VB),XML,JavaScript,Java,HTML

How to handle dynamic objects in QTP?
QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time. Check this out-
If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object. While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.

The Smart Identification mechanism uses two types of properties:
Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from to any other value, you could no longer call it the same object. Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.

Explain the keyword createobject with an example.
Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
servername:Required. The name of the application providing the object.
typename : Required. The type or class of the object to create.
location : Optional. The name of the network server where the object is to be created.

What is a Run-Time Data Table? Where can I find and view this table?
-In QTP, there is data table used , which is used at runtime.
-In QTP, select the option View->Data tabke.
-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.

How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Yes, there’s an in-built functionality called “Step Generator” in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.

What is the difference between check point and output value.
An outPut value is a value captured during the test run and entered in the run-time but to a specified location. EX:-Location in Data Table[Global sheet / local sheet]
Types of properties that Quick Test learns while recording?
(a) Mandatory (b) Assistive . In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.

Differences between QTP & Winrunner?
(a) QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting.
(b) QTP supports “.NET” application Automation not available in Winrunner
(c) QTP has “Active Screen” support which captures the application, not available in WR.
(d) QTP has “Data Table” to store script values , variables which WR does not have.
(e) Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a script – without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up script development.

Few basic questions on commonly used Excel VBA functions.
common functions are:
Coloring the cell
Auto fit cell
setting navigation from link in one cell to other saving

How does Parameterization and Data-Driving relate to each other in QTP?
To datadrive we have to parameterize.i.e. we have to make the constant value as parameter, so that in each iteraration(cycle) it takes a value that is supplied in run-time datatable. Through parameterization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestable, & it’s also of no use.

What is the difference between Call to Action and Copy Action.?
Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)

How to verify the Cursor focus of a certain field?
Use “focus” property of “GetRoProperty” method”

Any limitation to XML Checkpoints?
Mercury has determined that 1.4MB is the maximum size of a XML file that QTP 6.5 can handle

How to make arguments optional in a function?
this is not possible as default VBS doesn’t support this. Instead you can pass a blank scring and have a default value if arguments r not required.

How to add a text checkpoint to your test to check whether ‘welcome’ is displayed in your welcome page.
1 Locate the page where you want to add a text checkpoint.

2 Create a text checkpoint.
In the Active Screen, under your page highlight the text welcome. Right-click the highlighted text and choose Insert Text Checkpoint. The Text Checkpoint Properties dialog box opens.
When Checked Text appears in the list box, the Constant field displays the text string you highlighted. This is the text QuickTest looks for when running the test.
Click OK to accept the default settings in this dialog box.
QuickTest adds the text checkpoint to your test. It is displayed in the Keyword View as a checkpoint operation on your welcome page

3 Save the test.

How to Running and Analyzing a Test with Checkpoints?
1 Expand the test and review your test.
Choose View > Expand All or use the * shortcut key on your number keypad.

2 Start running your test.
Click Run or choose Test > Run. The Run dialog box opens. Ensure that New run results folder is selected. Accept the default results folder name. Click OK. When the test run is completed, the Test Results window opens.

3 View the test results.
When QuickTest finishes running the test, the Test Results window opens. The test result should be Passed, indicating that all checkpoints passed. If one or more checkpoints had failed, the test result would be Failed.

4 View the results of the page checkpoint.
In the Details pane, you can review the details of the page checkpoint, which lists the items checked.

5 View the results of the table checkpoint.
In the Details pane, you can review the details of the table checkpoint. You can also review the values of the table cells (cell values that were checked are displayed in black; cell values that were not checked are displayed in gray).

6 View the results of the standard checkpoint.
In the Details pane, you can review the details of the standard checkpoint, which lists the properties that were checked and their values. The checkpoint passed because the actual values of the checked properties match the expected values.

7 View the results of the text checkpoint.
In the Details pane, you can review the details of the text checkpoint. The checkpoint passed because the actual text matches the expected text.

8 Close the Test Results window. Choose File > Exit.

How to Defining a Data Table Parameter for QTP?
1 Start QuickTest and open the Checkpoint test.
2 Save the test as Parameter.
3 Confirm that the Active Screen option is enabled.
4 Confirm that the Data Table option is enabled.
5 Select the text to parameterize.
6 Set the parameterization properties.
How to add a runtime parameter to a datasheet?
DataTable.LocalSheet
The following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.
MyParam=DataTable.LocalSheet.AddParameter(”Time”, “5:45?)
How to change the run-time value of a property for an object?
SetTOProperty changes the property values used to identify an object during the test run. Only properties that are included in the test object description can be set

How to retrieve the property of an object?
using “GetRoProperty”.

How to open any application during Scripting?
SystemUtil , object used to open and close applications and processes during a run session.
(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run “Notepad.exe” SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )

How to covert a String to an integer?
CInt()—> a conversion function available.

Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?
Inserting a call to action will only Import the columns of the Action called

Differentiate the two Object Repository Types of QTP.
Object repository is used to store all the objects in the application being tested.2 types of oject repositoy per action and shared. In shared repository only one centralised repository for all the tests. where as in per action.for each test a separate per action repostory is created.

What the differences are and best practical application of each.
Per Action: For Each Action, one Object Repository is created. Shared : One Object Repository is used by entire application

Explain what the difference between Shared Repository and Per_Action Repository
Shared Repository: Entire application uses one Object Repository , that similar to Global GUI Map file in WinRunner Per Action: For each Action ,one Object Repository is created, like GUI map file per test in WinRunner

Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.
I Used the functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop, browser and pages.

What projects have you used WinRunner on? Tell me about some of the challenges that arose and how you handled them.
pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it ,we use GUI SPY for that to handle such situation.
Can you do more than just capture and playback?
I have done Dynamically capturing the objects during runtime in which no recording, no playback and no use of repository is done AT ALL.
-It was done by the windows scripting using the DOM(Document Object Model) of the windows.
Summary: QuickTest Pro
Summary:
QuickTest Professional provides an interactive, visual environment for test development.
Here is the description from the Mercury Interactive “How it Works” section of the QuickTest Pro web page:
Mercury QuickTest Professional™ allows even novice testers to be productive in minutes. You can create a test script by simply pressing a Record button and using an application to perform a typical business process. Each step in the business process is automated documented with a plain-English sentence and screen shot. Users can easily modify, remove, or rearrange test steps in the Keyword View.

QuickTest Professional can automatically introduce checkpoints to verify application properties and functionality, for example to validate output or check link validity. For each step in the Keyword View, there is an ActiveScreen showing exactly how the application under test looked at that step. You can also add several types of checkpoints for any object to verify that components behave as expected, simply by clicking on that object in the ActiveScreen.

You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.

Advanced testers can view and edit their test scripts in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.

Once a tester has run a script, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test script specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining TestFusion reports with Mercury Quality Management, you can share reports across an entire QA and development team.

QuickTest Professional also facilitates the update process. As an application under test changes, such as when a “Login” button is renamed “Sign In,” you can make one update to the Shared Object Repository, and the update will propagate to all scripts that reference this object. You can publish test scripts to Mercury Quality Management, enabling other QA team members to reuse your test scripts, eliminating duplicative work.

QuickTest Professional supports functional testing of all popular environments, including Windows, Web, .Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services.

– QuickTest Pro “How it Works” webpage from Mercury:
http://www.mercury.com/us/products/quality-center/functional-testing/quicktest-professional/works.html

We like QuickTest Pro and now prefer implementing it over WinRunner. When you get into advance testing scenarios, QuickTest Pro has more options and they are easier to implement compared to WinRunner in our opinion.

Do to the similarities in concept and features, an experienced WinRunner user can easily convert to QuickTest Pro and quickly become an efficient Test Automation Engineer!

We recommend that existing customers begin all new development with QuickTest Pro and use the built-in feature of calling WinRunner scripts from QuickTest Pro for all existing WinRunner scripts that they already have. As older scripts require updates and time permits, we recommend replacing them with QuickTest Pro scripts. Eventually you will be able to convert your test script library with all QuickTest Pro scripts.
Pros:
* Will be getting the initial focus on development of all new features and supported technologies.
* Ease of use.
* Simple interface.
* Presents the test case as a business workflow to the tester (simpler to understand).
* Numerous features.
* Uses a real programming language (Microsoft’s VBScript) with numerous resources available.
* QuickTest Pro is significantly easier for a non-technical person to adapt to and create working test cases, compared to WinRunner.
* Data table integration better and easier to use than WinRunner.
* Test Run Iterations/Data driving a test is easier and better implement with QuickTest.
* Parameterization easier than WinRunner.
* Can enhance existing QuickTest scripts without the “Application Under Test” being available; by using the ActiveScreen.
* Can create and implement the Microsoft Object Model (Outlook objects, ADO objects, FileSystem objects, supports DOM, WSH, etc.).
* Better object identification mechanism.
* Numerous existing functions available for implementation – both from within Quick Test Pro and VBScript.
* QTP supports .NET development environment (currently WinRunner 7.5 does not).
* XML support (currently WinRunner 7.5 does not).
* The Test Report is more robust in QuickTest compared to WinRunner.
* Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from QuickTest).
Cons:
* Currently there are fewer resources (consultants and expertise) available due to QTP being a newer product on the market and because there is a greater Demand than Supply, thus fewer employee/consulting resources.
* Must know VBScript in order to program at all.
* Must be able to program in VBScript in order to implement the real advance testing tasks and to handle very dynamic situations.
* Need training to implement properly.
* The Object Repository (OR) and “testing environment” (paths, folders, function libraries, OR) can be difficult to understand and implement initially.

Explain the terms “TEST” and “ Business Component”
Test—A collection of steps organized into one or more actions, which are used to verify that your application performs as expected. By default each test begins with a single action. Business Component—A collection of steps representing a single task in your application. Business components (also known as components) are combined into specific scenarios to build business process tests in Mercury Quality Center with Business Process Testing. A component does not contain actions, you add steps directly to a componenet.

What is check point?
A checkpoint checks specific values or characteristics of a page, object, or text string and enables you to identify whether or not your Web site or application is functioning correctly. A checkpoint compares the value of an element captured in your test when you recorded your test, with the value of the same element captured during the test run.

What do you mean by iteration ?
Each run session that uses a different set of parameterized data is called an iteration.

What is the current version of QuickTest Professional?

August 2, 2007

The latest release of QuickTest Professional

QuickTest Professional 9.2 is latest release of QuickTest Professional.

QuickTest Professional add-ins:
QuickTest Professional Java Add-in 9.1
QuickTest Professional .NET Add-in 9.2
QuickTest Professional Oracle Add-in 8.2
QuickTest Professional PeopleSoft Add-in 8.2
QuickTest Professional Add-in 8.2 for SAP Solutions
QuickTest Professional Siebel Add-in 8.0
QuickTest Professional Stingray Add-in 8.2
QuickTest Professional Terminal Emulator Add-in 8.0
QuickTest Professional VisualAge Smalltalk Add-in 8.2
QuickTest Professional Web Services Add-in 9.2

Functional Testing Concurrent License Server
The current version of the Functional Testing Concurrent License Server is 9.0 (Sentinel License Manager 8.0.2).